title=""
url="/account/orders.html"

layout="default"

==
{% set orders = catalog.orders %}
<div class="orderCont pd_b3">
	<nav class="crumbs_nav">
		<ul class="crumbs_list rdstr">
			<li class="crumbs_item">
				<a class="crumbs_link" href="/">
					<span>ホーム</span>
				</a>
			</li>
			<li class="crumbs_item">
				<a class="crumbs_link" href="{{ 'account/dashboard'|page }}">
					<span>マイページトップ</span>
				</a>
			</li>
			<li class="crumbs_item no_deco">
				<span class="crumbs_link">お買物履歴詳細</span>
			</li>
		</ul>
	</nav>
	<section>
		<div class="_tabArea">
			<ul class="flatTab_nav box_list">
				<li class="_tab flatTab_navList flatTab_navList_box box_list_main _selected">
					<a class="_brandTab_tab flatTab_navList_link" href="#">
						<div class="flatTab_navList_inner">注文済み({{ op }})</div>
					</a>
				</li>
				<li class="_tab flatTab_navList flatTab_navList_box box_list_main">
					<a class="_brandTab_tab flatTab_navList_link" href="#">
						<div class="flatTab_navList_inner">お支払い済み
							{% for os in orderStatus %}
							{% if os.status_id == 2 %}
							({{ os.count }})
							{% endif %}
							{% endfor %}
						</div>
					</a>
				</li>
				<li class="_tab flatTab_navList flatTab_navList_box box_list_main">
					<a class="_brandTab_tab flatTab_navList_link" href="#">
						<div class="flatTab_navList_inner">配送済み
							{% for os in orderStatus %}
							{% if os.status_id == 5 %}
							({{ os.count }})
							{% endif %}
							{% endfor %}
						</div>
					</a>
				</li>
				<li class="_tab flatTab_navList flatTab_navList_box box_list_main">
					<a class="_brandTab_tab flatTab_navList_link" href="#">
						<div class="flatTab_navList_inner">キャンセル済み({{ cr }})</div>
					</a>
				</li>
			</ul>
			<div class="flatTab_contents">
				<div class="_contents _selected">
					{% if count(orders) > 0 %}
					<table class="orderCont" style="width: 105%">
<!-- 						<tr>
							<th>条款</th>
							<th>総計</th>
							<th>注文状况</th>
							<th>操作</th>
						</tr> -->
						{% for key, order in orders %}
						{% if order.order_status.code == 'placed' or order.order_status.code == 'pressed' %}
						<tr style="background:#f8f8f8;">
							<td colspan="4">
								<b>注文NO.：</b>{{ order.sn }}<br>
								<b>ご注文日付と時間：</b>{{ formatDate("m/d/Y H:i:s", order.created_at) }}
							</td>
						</tr>
						<tr>
							<td width="35%">
								{% for m, orderproduct in order.products %}
								{% set condition = { 'id': orderproduct.product_id } %}
								{% set product = catalog.product(condition) %}
								<div class="orderdiv">
									<a class="table_type_a" href="{{product.url}}" title="{{ orderproduct.name }}" target="_blank">
										<img title="{{ orderproduct.name }}" src="{{ product.getMainThumb(80,80) }}">
										× {{ orderproduct.qty }}
									</a>
								</div>
								{% endfor %}
							</td>
							<td class="subtotal" width="15%">
								{{ order.total_price|formatPriceNotRate }}
							</td>
							<td class="total" width="20%">
								{{ ('jason.ccshop::lang.order.status.' ~ order.order_status.code)|trans }}
							</td>
							<td class="textAlign">
<!-- 								{{ form_open({'request': 'onRePaymentOrder', 'class': 'checkoutForm','id':'yy_onRePaymentOrder'}) }}
								<input type="hidden" name="key" value="{{ order.sn }}">
								<button type="submit" form="yy_onRePaymentOrder" class="pay_btn" style="background-color: #ee92a3">今すぐ支払う</button>
								{{ form_close() }} -->
								<a href="/repay-{{ order.sn }}-{{ order.payment_method }}-p.html" class="pay_btn">今すぐ支払う</a>
								<a class="orderXx pay_btn" style="margin-top: 5px" href="/orderdetail-{{ order.sn }}.html">詳細</a>
							</td>
						</tr>
						{% endif %}
						{% endfor %}
					</table>
					{% else %}
					<h4 style="text-align:center;margin-top:20px;color:#615757;">ご注文いただいた履歴はございません。</h4>
					{% endif %}
				</div>
				<div class="_contents">
					{% if count(orders) > 0 %}
					<table class="orderCont">
<!-- 						<tr>
							<th>条款</th>
							<th>総計</th>
							<th>注文状况</th>
							<th>操作</th>
						</tr> -->
						{% for key, order in orders %}
						{% if order.order_status.code == 'paid' %}
						<tr style="background:#f8f8f8;">
							<td colspan="4">
								<b>注文NO.：</b>{{ order.sn }}<br>
								<b>ご注文日付と時間：</b>{{ formatDate("m/d/Y H:i:s", order.created_at) }}
							</td>
						</tr>
						<tr>
							<td width="35%">
								{% for m, orderproduct in order.products %}
								{% set condition = { 'id': orderproduct.product_id } %}
								{% set product = catalog.product(condition) %}
								<div class="orderdiv">
									<a class="table_type_a" href="{{product.url}}" title="{{ orderproduct.name }}" target="_blank">
										<img title="{{ orderproduct.name }}" src="{{ product.getMainThumb(80,80) }}">
										× {{ orderproduct.qty }}
									</a>
								</div>
								{% endfor %}
							</td>
							<td class="subtotal" width="15%">
								{{ order.total_price|formatPriceNotRate }}
							</td>
							<td class="total" width="20%">
								{{ ('jason.ccshop::lang.order.status.' ~ order.order_status.code)|trans }}
							</td>
							<td class="textAlign">
								<a class="orderXx" href="/orderdetail-{{ order.sn }}.html">詳細</a>
							</td>
						</tr>
						{% endif %}
						{% endfor %}
					</table>
					{% else %}
					<h4 style="text-align:center;margin-top:20px;color:#615757;">ご注文いただいた履歴はございません。</h4>
					{% endif %}
				</div>
				<div class="_contents">
					{% if count(orders) > 0 %}
					<table class="orderCont">
<!-- 						<tr>
							<th>条款</th>
							<th>総計</th>
							<th>注文状况</th>
							<th>操作</th>
						</tr> -->
						{% for key, order in orders %}
						{% if order.order_status.code == 'delivered' %}
						<tr style="background:#f8f8f8;">
							<td colspan="4">
								<b>注文NO.：</b>{{ order.sn }}<br>
								<b>ご注文日付と時間：</b>{{ formatDate("m/d/Y H:i:s", order.created_at) }}
							</td>
						</tr>
						<tr>
							<td width="35%">
								{% for m, orderproduct in order.products %}
								{% set condition = { 'id': orderproduct.product_id } %}
								{% set product = catalog.product(condition) %}
								<div class="orderdiv">
									<a class="table_type_a" href="{{product.url}}" title="{{ orderproduct.name }}" target="_blank">
										<img title="{{ orderproduct.name }}" src="{{ product.getMainThumb(80,80) }}">
										× {{ orderproduct.qty }}
									</a>
								</div>
								{% endfor %}
							</td>
							<td class="subtotal" width="15%">
								{{ order.total_price|formatPriceNotRate }}
							</td>
							<td class="total" width="20%">
								{{ ('jason.ccshop::lang.order.status.' ~ order.order_status.code)|trans }}
							</td>
							<td class="textAlign">
								<a class="orderXx" href="/orderdetail-{{ order.sn }}.html">詳細</a>
							</td>
						</tr>
						{% endif %}
						{% endfor %}
					</table>
					{% else %}
					<h4 style="text-align:center;margin-top:20px;color:#615757;">ご注文いただいた履歴はございません。</h4>
					{% endif %}
				</div>
				<div class="_contents">
					{% if count(orders) > 0 %}
					<table class="orderCont">
<!-- 						<tr>
							<th>条款</th>
							<th>総計</th>
							<th>注文状况</th>
							<th>操作</th>
						</tr> -->
						{% for key, order in orders %}
						{% if order.order_status.code == 'canceled' or  order.order_status.code == 'refunded'  %}
						<tr style="background:#f8f8f8;">
							<td colspan="4">
								<b>注文NO.：</b>{{ order.sn }}<br>
								<b>ご注文日付と時間：</b>{{ formatDate("m/d/Y H:i:s", order.created_at) }}
							</td>
						</tr>
						<tr>
							<td width="35%">
								{% for m, orderproduct in order.products %}
								{% set condition = { 'id': orderproduct.product_id } %}
								{% set product = catalog.product(condition) %}
								<div class="orderdiv">
									<a class="table_type_a" href="{{product.url}}" title="{{ orderproduct.name }}" target="_blank">
										<img title="{{ orderproduct.name }}" src="{{ product.getMainThumb(80,80) }}">
										× {{ orderproduct.qty }}
									</a>
								</div>
								{% endfor %}
							</td>
							<td class="subtotal" width="15%">
								{{ order.total_price|formatPriceNotRate }}
							</td>
							<td class="total" width="20%">
								{{ ('jason.ccshop::lang.order.status.' ~ order.order_status.code)|trans }}
							</td>
							<td class="textAlign">
								<a class="orderXx" href="/orderdetail-{{ order.sn }}.html">詳細</a>
							</td>
						</tr>
						{% endif %}
						{% endfor %}
					</table>
					{% else %}
					<h4 style="text-align:center;margin-top:20px;color:#615757;">ご注文いただいた履歴はございません。</h4>
					{% endif %}
				</div>
			</div>
		</div>
	</section>
	</div>

